<template>
  <div class="form">
    新增
    商品名 <input type="text" v-model="createParams.name">
    价格 <input type="number" v-model="createParams.price">
    库存 <input type="number" v-model="createParams.inventory">
    <br>
    <button @click="submit">提交</button>
  </div>

</template>

<script>
export default {
  data(){
    return {
      createParams: {
        id: 0,
        name: '',
        price: 0,
        inventory: 0
      },
    }
  },
  methods:{
    submit(){
      console.log('crate')
    }
  }
}
</script>

<style scoped>
.form {
  display: flex;
  flex-direction: column;

  box-shadow: 5px 5px black;
  border-radius: 20px;
  /*position: fixed;*/
  /*top: 40%;*/
  /*left: 60%;*/
  width: 400px;
  height: 220px;
  transition: width 10s linear 2s;
  background: rgba(89, 87, 87, 0.9);
  color: white;
  padding: 20px;
}
</style>
